package team.se.tms.service;

import team.se.tms.dto.Page;
import team.se.tms.dto.ProjectStageDetail;
import team.se.tms.dto.StageChain;
import team.se.tms.po.StageInfo;

import java.util.List;

public interface StageInfoService {
    /**
     * 获取项目阶段详情
     *
     * @param projectId 项目id
     * @return String 页面地址
     * @throws Exception 异常
     * @create on 2018/12/21 by johnny
     */
    ProjectStageDetail getProjectStageDetail(String projectId) throws Exception;

    /**
     * 获取所有项目的完成状态
     *
     * @param page 分页
     * @param teachCourseId 授课id
     * @return String 页面地址
     * @throws Exception 异常
     * @create on 2018/12/31 by johnny
     */
    List<ProjectStageDetail> listAllProjectStageDetail(Page page,String teachCourseId) throws Exception;
    /**
     * 修改项目阶段完成状态及分数
     *
     * @param projectId 项目id
     * @param stageId 阶段id
     * @return grade 阶段评分
     * @throws Exception 异常
     * @create on 2018/12/21 by johnny
     */
    Boolean modifyProjectStageComplete(String projectId,String stageId,Float grade) throws Exception;
    Boolean saveStageChain(List<StageInfo> stageInfos) throws Exception;
    List<StageChain> listStageChains(Page page) throws Exception;
    Boolean modifyStageChain(String oldLineFirstStageId,List<StageInfo> stageInfos) throws Exception;
    Boolean deleteStageChain(String firstStageId) throws Exception;

    /**
     * 删除阶段链
     * @create on 2018/12/30 by argentum
     *
     * @param stageId
     * @return
     * @throws Exception
     */
    Boolean removeStageInfos(String stageId) throws Exception;
}
